package com.jiyun.purse.service.impl;

import com.jiyun.purse.mapper.SecurityMapper;
import com.jiyun.purse.service.SecurityService;
import com.jiyun.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SecurityServiceImpl implements SecurityService {
    @Autowired
    private SecurityMapper securityMapper;

    /**
     * 根据用户ID查找安全信息
     *
     * @param userId 用户ID
     * @return 包含用户安全信息的结果对象
     */
    @Override
    public Result findSecurity() {
        return Result.ok(securityMapper.findSecurity());
    }

    /**
     * 根据用户ID查找所有相关安全设置
     *
     * @param userId 用户ID
     * @return 包含用户所有安全设置的结果对象
     */
    @Override
    public Result findAll() {
        return Result.ok(securityMapper.findAll());
    }
}
